<?php
class TestController extends Yaf_Controller_Abstract
{
	private function init()
	{
		$this->TestModel = new TestModel();
		$this->Session   = Yaf_Registry::get("session");
        $this->utl       = Yaf_Registry::get("utl");
	}

	public function indexAction() 
	{
        $this->getView()->assign("name", 123456789);
        $this->getView()->assign("user",  $this->TestModel->selectTest());
        print('{"status":false,"info":"登陆失败, 用户不存在！"}');
	}

	public function sessionAction()
	{
		$this->Session->set('session_demo', 'this is seesion demo!');
		print_r($this->Session->get('session_demo'));
		return false;
	}

    public function utlAction()
    {
        //page demo
        $page = $this->getRequest()->get("page");
        print($this->utl::page('/test/utl', $page, 10, $offset=2, $status=''));
        return false;
    }
	
}
